package sun.nan.test.cluster;

import java.util.List;


public class Main {
	public static void main(String[] args) {
		double[][] data = { { 1, 2 }, { 1, 3 }, { 1, 4 }, { 5, 1 }, { 5, 2 },
				{ 5, 3 }, { 11, 1 }, { 11, 2 }, { 11, 3 } };
		int k = 3;
		WawaKMeans kmeans = new WawaKMeans(data, k);
		kmeans.Start();
		WawaCluster[] clusters = kmeans.getClusters();
		for (WawaCluster wawaCluster : clusters) {
			List<Integer> members = wawaCluster.CurrentMembership;
			for (int i : members) {
				System.out.println(data[i][0] + " " + data[i][1]);
			}
			System.out.println("----------------------------");
		}
	}
}
